package com.example.project1.service;

import com.example.project1.handle.UserHandle;
import com.example.project1.information.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImp implements UserService{
    @Autowired
    private UserHandle userHandle;
    @Override
    public List<User> getAll() {
        return userHandle.findAll();
    }

    @Override
    public boolean insertuser(String username,String password) {
        return userHandle.insert(username,password);
    }
    @Override
    public User getoneuser(String name,String password){
        return userHandle.getuser(name,password);
    }
    @Override
    public boolean deleteuser(String username){
        return userHandle.deleteuser(username);
    }

}
